package edu.rmit.dao;

import java.util.List;

import edu.rmit.domain.User;

/**
 * This interface defines the user operation. Like get user, change the user
 * status, register user, and get user by its status.
 * 
 * @author Joey George
 * @version 1.0
 */
public interface IUserDAO {
	/**
	 * This method defines the operation to get an user by its user name.
	 * 
	 * @param userName
	 *            The user name of particular user.
	 * @return The user object which represented by the user name.
	 */
	public User getUserInfo(String userName);

	/**
	 * This method defines the operation to change an user's status.
	 * 
	 * @param userName
	 *            The user name of which you want to changed.
	 * @param destinationStatus
	 *            The destination status which you want to changed to.
	 */
	public void changeActiveStatus(String userName, boolean destinationStatus);

	/**
	 * This method defines the operation to change an user's login status.
	 * 
	 * @param userName
	 *            The user name of which you want to changed.
	 * @param destinationStatus
	 *            The destination status which you want to changed to.
	 */
	public void changeLoginStatus(String userName, boolean destinationStatus);

	/**
	 * This method defines to create a new account for a user
	 * 
	 * @param userName
	 *            The user name which you can use to login.
	 * @param password
	 *            The password which you can use this to login.
	 * @param firstName
	 *            The first name of the user.
	 * @param lastName
	 *            The last name of the user.
	 * @param isActive
	 *            The status of the user.
	 * @return A particular which contains this attribute.
	 */
	public void createAccount(String userName, String password,
			String firstName, String lastName, boolean isActive);

	/**
	 * This method defines the operation to get the users by its status.
	 * 
	 * @param isActive
	 *            The destination status which you want to get.
	 * @return A list of users which status is currently in this status.
	 */
	public List<User> getUsersByActiveStatus(boolean isActive);
}
